import { createRouter,createWebHistory } from "vue-router";
import Layout from '@/layout';

const routes = [
    {
        path: '',
        component: Layout,
        redirect: 'index',
        children: [
            {
                path: 'index',
                component: () => import('@/views/index'),
                name: 'Index',
            }
        ]
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/login')
    },
]

const router = createRouter({
    history:createWebHistory(),
    routes
})

export default router;
  